Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix contrast issues with color overrides #9

Merged
merged 4 commits into from
Nov 2, 2024
Merged

Conversation

ashwinvis
Copy link

The commit fbdbc8a added a few color overrides over what sphinx-lesson provides.

I don't know what the original purpose of this implementation was. It seems the intention was to distinguish different overrides. However there are contrast issues and a missing comma, which I am trying to rectify here.

@ashwinvis
Copy link
Author

I used https://webaim.org/resources/contrastchecker/ and Firefox's accessibility checker (Shift+F12) to look for issues.

Original sphinx-lesson implementation

https://coderefinery.github.io/sphinx-lesson/directives/.

Overrides: before this PR

image

image

image

Overrides: after this PR

image

image

image

}

/* discussion */
.rst-content .discussion {
background: rgba(231, 212, 232 0.3);
background: rgba(231, 212, 232, 0.3);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing comma!

@ashwinvis ashwinvis requested a review from apovas October 7, 2024 12:51
@ashwinvis
Copy link
Author

224e7e3 also fixes typealong directive (different from type-along!)

Before

image

After

image

@ashwinvis
Copy link
Author

Perhaps Apostolos recalls the context and can also comment on the colors.

@ffrancesco94
Copy link

I like the general vibe of how it looks now. My only doubt is about the question call-out, that red breaks a bit the general pastel tone of the other colours.

@ashwinvis
Copy link
Author

True. I only made the questions colour darker to meet the 7:1 contrast criterion. Pastel colour is not possible with white text, but I can look for a pinkish colour

@ashwinvis
Copy link
Author

@ffrancesco94 how about this:

https://webaim.org/resources/contrastchecker/?fcolor=00000&bcolor=FCE762

image

@ashwinvis
Copy link
Author

In ba23d21 I fixed these directive which are seldom used. May not be the best color choices, but at least it is readable now.

Before

image

After

image

@ashwinvis ashwinvis merged commit 4f35af8 into main Nov 2, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants